export type PicLink = {
  link: string;
  index: number;
}

export type PicLinkFunc = (link: PicLink) => void;

export type statusType = number | string | boolean | object | PicLink;

export const isPLink = (obj: any): obj is PicLink => {
  const keys = Object.keys(obj);
  return obj && keys.includes('link') && keys.includes('index') && typeof obj.link ==='string' && typeof obj.index === 'number';
}

export type updateStatusFunc = (configKey: string,payload: statusType)=> void;
